home *** CD-ROM | disk | FTP | other *** search
/ Utilities Professional 1-1500 / Utilities Professional 1-1500 (1994)(WPD)[!].iso / 07511000 / var0775.dms / var0775.adf / tutor3.P&C < prev    next >
Text File  |  1978-09-02  |  3KB  |  106 lines

  1. * How Did you do ?@ You should have had something like below...
  2. *
  3. * Picture In PICTURES/KEYBOARD
  4. * Set Zone 1 - ( Which would have changed to Set Mouse Zone 1:(**@**@**@**)  )
  5. * Wait Zone
  6. * Clear
  7. * Text - ( Which would be Text Window *:(**@**):***** )
  8. *
  9. * Get it right !!!. Your fast becoming a real Pro.
  10. * TITLES@ JUMPS &  LOOPS       [ Load DEMOS/WINDOW for Example ]
  11. * ---------------------
  12. * TITLES - A title is used to mark the begining of a certain part of a 
  13. *          Program. Some Basics would use line numbers@ But P.&.C uses
  14. *          names. All titles must be enclosed in brackets eg: ' [ hello ] '
  15. *          This would set up the title HELLO.
  16. * JUMPS  - Once you have defined some Titles you can easily get the computer
  17. *          to go to a specific  place by using a ' goto *** ' command.
  18. *          eg:    ' goto hello '
  19. * Next..
  20. * Study the program below and try to work out which text message would be
  21. * printed on the screen.
  22. *
  23. * [ MAIN ]
  24. * Goto SEC
  25. *
  26. * [ FIRST ]
  27. * Text - Hi
  28. *
  29. * [ SEC ]
  30. * Text - Hello
  31. *
  32. * You should have worked out that only the ' Hello ' would be put onto the
  33. * screen. This is because the second command down ' Goto SEC '@ tells the
  34. * computer to jump straight down to the Program SEC.
  35. * But what if you wanted to jump back up again ?@ Well you could use 
  36. * another Goto command but an easier way would be to use ' Return '.
  37. * The ' Return ' command tells the computer to jump back to the last
  38. * Goto command that it encounterd.
  39. *
  40. * Cont...
  41. * Ok@ Time to start using the old grey cells again...
  42. * Look at the example program below@ which message would it print up on
  43. * the screen....?
  44. *
  45. * [ MAIN ]
  46. *
  47. * Goto TEMP
  48. * Text ' Hi '
  49. * End
  50. *
  51. * [ TEMP ]
  52. *
  53. * Text ' Hello '
  54. * Return
  55. *
  56. * Correct !!!@ it would print both. ' Hello '@ first followed by ' Hi '.
  57. * The ' End ' command tells the computer to stop where it is and come out
  58. * of the program@ otherwise it would carry on and print ' hello ' again.
  59. *
  60. *
  61. * Time to see if you have taken it all in by having another.....
  62. * SMALL TEST
  63. * ----------
  64. * The test I am going to set you will be very different from the others.
  65. * I have written most of the program myself@ all you have to do is
  66. * fill in the parts of it I have missed.
  67. * The program must do the following :-
  68. * Print the message ' Hello ' & ' Hi '@ And then End...
  69. *
  70. [ MAIN ]
  71.  
  72. Text Window 0:(16@9):Hi
  73.  
  74. Text Window 0:(1@18):This Line should not be on the screen
  75. Goto QUIT
  76. *
  77. [ MESSAGE ]
  78. Text Window 0:(15@6):Hello
  79. Return
  80. *
  81. [ QUIT ]
  82. End
  83. * As I have said before this test is different because there is no way of
  84. * knowing if the program has worked properly. In order to see if the program
  85. * is correct you will have to TEST the program@ ( Click TEST@ BUT NOT YET )
  86. * Hopefully when you do this you should see the two words Hello & Hi on the
  87. * screen. If you don't click the mouse again to return to the editor@ find
  88. * page 4@ delete what you think is wrong & try again.
  89. *
  90. * This will be your first ever running program !!!!
  91. *
  92. * Once you are happy with the program QUIT & LOAD up TUTOR4
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.